# Copyright (C) Kumo inc. and its affiliates.
# Author: Jeff.li lijippy@163.com
# All rights reserved.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <https:#www.gnu.org/licenses/>.
#

add_library(
  pollux_query_trace_replayer_base
        aggregation_replayer.cpp
        filter_project_replayer.cpp
        hash_join_replayer.cpp
        operator_replayer_base.cpp
        partitioned_output_replayer.cpp
        table_scan_replayer.cpp
        table_writer_replayer.cpp
        trace_replay_runner.cpp
        trace_replay_task_runner.cpp)

target_link_libraries(
  pollux_query_trace_replayer_base
  pollux_aggregates
  pollux_type
  pollux_vector
  pollux_vector_test_lib
  pollux_exec
  pollux_exec_test_lib
  pollux_dwio_parquet_reader
  pollux_dwio_parquet_writer
  pollux_hive_connector
  pollux_tpch_connector
  pollux_memory
  pollux_hdfs
  pollux_gcs
  pollux_abfs
  pollux_s3fs
  Melon::melon
)

add_executable(pollux_query_replayer trace_replayer_main.cpp)

target_link_libraries(
  pollux_query_replayer
  pollux_query_trace_replayer_base
  pollux_exec
  pollux_exec_test_lib
  pollux_tpch_connector)

add_library(pollux_trace_file_tool_base trace_file_tool_runner.cpp)

target_link_libraries(
  pollux_trace_file_tool_base
  pollux_exec
  pollux_type
  pollux_vector
  pollux_exec
  pollux_hive_connector
  Melon::melon
)

add_executable(pollux_trace_file_tool trace_file_tool_main.cpp)

target_link_libraries(
  pollux_trace_file_tool pollux_trace_file_tool_base)

